import TabsView from '@/layouts/tabs/TabsView'
import BlankView from '@/layouts/BlankView'
import PageView from '@/layouts/PageView'

// 路由配置
const options = {
  routes: [
    {
      path: '/test',
      name: '测试',
      component: () => import('@/pages/test/test1')
    },
    {
      path: '/login',
      name: '登录页',
      component: () => import('@/pages/login')
    },
    {
      path: '*',
      name: '404',
      component: () => import('@/pages/exception/404'),
    },
    {
      path: '/403',
      name: '403',
      component: () => import('@/pages/exception/403'),
    },
    {
      path: '/',
      name: '首页',
      component: TabsView,
      redirect: '/login',
      children: [
        {
          path: 'formula',
          name: '配方管理',
          meta: {
            icon: 'check-circle-o',
            page: {
              cacheAble: false
            }
          },
          component: PageView,
          children: [
            {
              path: 'product',
              name: '产品配方',
              component: () => import('@/pages/formula/product'),
            },
            {
              path: 'puFormualDetail/detail/:id',
              name: '产品配方详情',
              meta: {
                highlight: '/formula/product',
                invisible: true
              },
              component: () => import('@/pages/formula/product/detail/puFormualDetail')
            },
            {
              path: 'device',
              name: '设备配方',
              component: () => import('@/pages/formula/device'),
            },

          ]
        },
      ]
    },
  ]
}

export default options
